

#ifndef GREEDY_SNACK_GAME_H
#define GREEDY_SNACK_GAME_H

#include <stdio.h>
#include <stdlib.h>
#include <graphics.h>
#include <stdbool.h>
#include <conio.h>
#include <time.h>


#define MAX_SIZE 500
#define WIDTH 640
#define HEIGHT 480
#define SPEED 10

typedef enum
{
	LEFT,
	RIGHT,
	UP,
	DOWN
} Direction;

typedef struct {
	int x;
	int y;
} Point;

typedef struct {
	Point coords[MAX_SIZE];
	int size;
	int length;
	Direction dir;
} Snake;



void gameInit(Snake* snake, Point* food);

void display(const Snake* snake, const Point* food);

void snakeMove(Snake* snake);

void changeDirection(Snake* snake);

void createFood(Point* food);

bool isEaten(Snake* snake, Point* food);

#endif //GREEDY_SNACK_GAME_H